package cn.edu.zju.gis.disasterBE.sever.controller;

import cn.edu.zju.gis.disasterBE.sever.entity.DisasterProduct;
import cn.edu.zju.gis.disasterBE.sever.entity.Image;
import cn.edu.zju.gis.disasterBE.sever.entity.global.MyResponse;
import cn.edu.zju.gis.disasterBE.sever.service.DisasterProductService;
import cn.edu.zju.gis.disasterBE.sever.service.ImageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api("灾害应急产品模块")
@RestController
@RequestMapping("/disasterProduct")
@RequiredArgsConstructor(onConstructor_ = {@Autowired})

public class DisasterProductController {
    private final DisasterProductService disasterProductService;

    @ApiOperation("获得灾害产品信息")
    @GetMapping("/GetProducts")
    public MyResponse<List<DisasterProduct>> disasterProductGet() {
        return disasterProductService.disasterProductGetAll();
    }
}
